package org.andy.shop.service.Impl;

import org.andy.shop.dao.UserInfoDao;
import org.andy.shop.entity.UserInfo;
import org.andy.shop.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: Chen
 * @Date: 2016/4/16 14:37
 * @Email: wirechen@gmail.com
 * @Description:
 */
@Service("userInfoService")
@Transactional
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoDao userInfoDao;

    public UserInfo getById(Integer id) {
        return userInfoDao.getById(id);
    }

    public List<UserInfo> findAll() {
        return userInfoDao.findAll();
    }

    public Integer save(UserInfo userInfo) {
        return userInfoDao.save(userInfo);
    }

    public void delete(Integer id) {
        userInfoDao.delete(id);
    }

    public void update(UserInfo userInfo) {
        userInfoDao.update(userInfo);
    }

}
